package com.fwx.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author : fengwenxiang
 * @date : 2022/6/24 21:35
 * @description：
 */
@RestController
@Slf4j
public class OrderZkController {
    @Autowired
    private RestTemplate restTemplate;
    public final static String URL = "http://cloud-provider-payment";

    @GetMapping("/consumer/payment/zk")
    public String paymentInfo(){
        String res = restTemplate.getForObject(URL + "/payment/zk", String.class);
        log.info("****************res ="+res);
        return res;
    }
}
